#include <sys/ioctl.h> #include <rpcsvc/rex.h>
program number: REXPROG xdr routines: int xdr_rex_start(xdrs, start); XDR *xdrs; struct rex_start *start; int xdr_rex_result(xdrs, result); XDR *xdrs; struct rex_result *result; int xdr_rex_ttymode(xdrs, mode); XDR *xdrs; struct rex_ttymode *mode; int xdr_rex_ttysize(xdrs, size); XDR *xdrs; struct ttysize *size; procs: REXPROC_START Takes rex_start structure, starts a command executing, and returns a rex_result structure. REXPROC_WAIT Takes no arguments, waits for a command to finish executing, and returns a rex_result structure. REXPROC_MODES Takes a rex_ttymode structure, and sends the tty modes. REXPROC_WINCH Takes a ttysize structure, and sends window size information. versions: REXVERS_ORIG Original version structures: #define REX_INTERACTIVE 1 /* Interative mode */ struct rex_start { char **rst_cmd; /* list of command and args */ char *rst_host; /* working directory host name */ char *rst_fsname; /* working directory file system name */ char *rst_dirwithin; /* working directory within file system */ char **rst_env; /* list of environment */ u_short rst_port0; /* port for stdin */ u_short rst_port1; /* port for stdin */ u_short rst_port2; /* port for stdin */ u_long rst_flags; /* options - see #defines above */ }; struct rex_result { int rlt_stat; /* integer status code */ char *rlt_message; /* string message for human consumption */ }; struct rex_ttymode { struct sgttyb basic; /* standard unix tty flags */ struct tchars more; /* interrupt, kill characters, etc. */ struct ltchars yetmore;/* special Berkeley characters */ u_long andmore; /* and Berkeley modes */ };